VERSION 5.00
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "crystl32.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmcust 
   BackColor       =   &H8000000D&
   Caption         =   "Customer"
   ClientHeight    =   2085
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5355
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   2085
   ScaleWidth      =   5355
   StartUpPosition =   2  'CenterScreen
   Begin Crystal.CrystalReport CrystalReport2 
      Left            =   360
      Top             =   600
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   348160
      PrintFileLinesPerPage=   60
   End
   Begin VB.CommandButton cmdclose 
      Caption         =   "&Close"
      Height          =   375
      Left            =   3360
      TabIndex        =   8
      Top             =   1440
      Width           =   1215
   End
   Begin VB.CommandButton cmdPrint 
      Caption         =   "&Print"
      Height          =   375
      Left            =   840
      TabIndex        =   7
      Top             =   1440
      Width           =   1215
   End
   Begin VB.TextBox Tdate 
      Height          =   285
      Left            =   3360
      TabIndex        =   6
      Top             =   960
      Width           =   1215
   End
   Begin VB.TextBox Fdate 
      Height          =   285
      Left            =   1200
      TabIndex        =   5
      Top             =   960
      Width           =   1215
   End
   Begin VB.TextBox custno 
      Height          =   315
      Left            =   4320
      TabIndex        =   1
      Top             =   600
      Visible         =   0   'False
      Width           =   735
   End
   Begin MSDataListLib.DataCombo customer 
      Height          =   375
      Left            =   1200
      TabIndex        =   0
      Top             =   240
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   661
      _Version        =   393216
      ListField       =   "CMNME"
      BoundColumn     =   "CMCNO"
      Text            =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "VNI-Times"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   4200
      Top             =   1680
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "To Date"
      ForeColor       =   &H8000000E&
      Height          =   195
      Left            =   2640
      TabIndex        =   4
      Top             =   960
      Width           =   585
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "From Date"
      ForeColor       =   &H8000000E&
      Height          =   195
      Left            =   240
      TabIndex        =   3
      Top             =   960
      Width           =   735
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Customer"
      ForeColor       =   &H8000000E&
      Height          =   195
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   660
   End
End
Attribute VB_Name = "frmcust"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdclose_Click()
    Unload Me
End Sub

Private Sub cmdPrint_Click()
If Fdate.Text = "" Or Tdate.Text = "" Then
    MsgBox "You must enter Date!", vbCritical, "Warning"
Else
    CrystalReport2.ReportFileName = DDAN & "\PurbyCustNo.rpt"
    CrystalReport2.RetrieveStoredProcParams
    CrystalReport2.StoredProcParam(0) = Format$(Trim(Fdate.Text), "mm/dd/yyyy")
    CrystalReport2.StoredProcParam(1) = Format$(Trim(Tdate.Text), "mm/dd/yyyy")
    CrystalReport2.StoredProcParam(2) = Trim(custno.Text)
    CrystalReport2.Destination = crptToWindow
    CrystalReport2.Action = 1
End If
End Sub

Private Sub customer_Change()
    custno.Text = customer.BoundText
    Fdate.SetFocus
End Sub
Private Sub Fdate_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If IsDate(Fdate.Text) = True Then
            Tdate.SetFocus
            Tdate.Text = ""
        Else
            MsgBox "Incorrect Date !, Enter again", vbCritical, "Warning"
            Fdate.SetFocus
            Fdate.Text = ""
        End If
    End If
End Sub

Private Sub Form_Load()
    Adodc1.ConnectionString = ConnectString
    Adodc1.CommandTimeout = 10
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select CMCNO,CMCNO + ' : ' + CMNME as CMNME FROM RCM"
    Adodc1.Refresh
    Fdate.Text = ""
    Tdate.Text = ""
    customer.Text = ""
    Set customer.RowSource = Adodc1
End Sub
Private Sub Tdate_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If IsDate(Tdate.Text) = True Then
            cmdPrint.SetFocus
        Else
            MsgBox "Incorrect Date !, Enter again", vbCritical, "Warning"
            Tdate.SetFocus
            Tdate.Text = ""
        End If
    End If
End Sub
